all: up2link.dll llserver llclient 

llserver: llserver.exe
	echo "#/bin/bash" >> $@
	echo "mono $^" >> $@
	chmod +x $@

llclient: llclient.exe
	echo "#/bin/bash" >> $@
	echo "mono $^" >> $@
	chmod +x $@

llserver.exe: up2link.dll
	mcs -debug+ -recurse:LastLand/'*.cs' -r:$^ -out:$@
	chmod -x $@

llclient.exe: up2link.dll
	mcs -debug+ -recurse:LastLandClient/'*.cs' -r:$^ -out:$@
	chmod -x $@

up2link.dll:
	mcs -debug+ -recurse:Up2Link/'*.cs' -t:library -out:$@

clean:
	rm up2link* ll*

